<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:78:"E:\web\project\baojia\wwwww\public/../application/admin\view\ziyuan\zedit.html";i:1536854298;s:70:"E:\web\project\baojia\wwwww\application\admin\view\layout\default.html";i:1529292885;s:67:"E:\web\project\baojia\wwwww\application\admin\view\common\meta.html";i:1535990037;s:69:"E:\web\project\baojia\wwwww\application\admin\view\common\script.html";i:1533222223;}*/ ?>
<!DOCTYPE html>
<html lang="<?php echo $config['language']; ?>">
    <head>
        <meta charset="utf-8">
<title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">

<link rel="shortcut icon" href="/public/assets/img/favicon.ico" />
<!-- Loading Bootstrap -->
<link href="/public/assets/css/backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">
<link href="/public/assets/js/uploadify/uploadify.css" rel="stylesheet">

<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
  <script src="/public/assets/js/html5shiv.js"></script>
  <script src="/public/assets/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
    var require = {
        config:  <?php echo json_encode($config); ?>
    };
</script>
<script src="/public/assets/libs/jquery/dist/jquery.min.js"></script>
<script src="/public/assets/js/uploadify/jquery.uploadify.min.js"></script>
    </head>

    <body class="inside-header inside-aside <?php echo defined('IS_DIALOG') && IS_DIALOG ? 'is-dialog' : ''; ?>">
        <div id="main" role="main">
            <div class="tab-content tab-addtabs">
                <div id="content">
                    <div class="row">
                        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                            <section class="content-header hide">
                                <h1>
                                    <?php echo __('Dashboard'); ?>
                                    <small><?php echo __('Control panel'); ?></small>
                                </h1>
                            </section>
                            <?php if(!IS_DIALOG && !$config['fastadmin']['multiplenav']): ?>
                            <!-- RIBBON -->
                            <div id="ribbon">
                                <ol class="breadcrumb pull-left">
                                    <li><a href="dashboard" class="addtabsit"><i class="fa fa-dashboard"></i> <?php echo __('Dashboard'); ?></a></li>
                                </ol>
                                <ol class="breadcrumb pull-right">
                                    <?php foreach($breadcrumb as $vo): ?>
                                    <li><a href="javascript:;" data-url="<?php echo $vo['url']; ?>"><?php echo $vo['title']; ?></a></li>
                                    <?php endforeach; ?>
                                </ol>
                            </div>
                            <!-- END RIBBON -->
                            <?php endif; ?>
                            <div class="content">
                                <div class="panel panel-default panel-intro">
    <div class="panel-heading">
        <?php echo build_heading(null, false); ?>
        <ul class="nav nav-tabs">
            <?php if(is_array($cates) || $cates instanceof \think\Collection || $cates instanceof \think\Paginator): $i = 0; $__LIST__ = $cates;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
             <li <?php if(( (!empty($data)) AND ($data['cate'] == $vo['id']) ) OR ( (!empty($cate_name)) AND  ($cate_name == $vo['name']) ) OR ( empty($data) AND empty($cate_name) AND ($key == 0))): ?> class="active" <?php endif; ?>><a href="#type_<?php echo $vo['id']; ?>" data-toggle="tab"><?php echo $vo['name']; ?></a></li>
            <?php endforeach; endif; else: echo "" ;endif; ?>
        </ul>
    </div>
    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <?php if(is_array($cates) || $cates instanceof \think\Collection || $cates instanceof \think\Paginator): $i = 0; $__LIST__ = $cates;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
             <div class="tab-pane fade <?php if(( (!empty($data)) AND ($data['cate'] == $vo['id']) ) OR ( (!empty($cate_name)) AND  ($cate_name == $vo['name']) ) OR ( empty($data) AND empty($cate_name) AND ($key == 0))): ?> active in <?php endif; ?>" id="type_<?php echo $vo['id']; ?>">
                <form id="type_<?php echo $vo['id']; ?>_form" class="form-horizontal" role="form" action=""  method="POST">
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">资源类型:</label>
                        <div class="col-xs-12 col-sm-8">
                            <select class="form-control" name="cate">
                                <option value="<?php echo $vo['id']; ?>" selected ><?php echo $vo['name']; ?></option>
                            </select>
                        </div>
                    </div>
                 <?php switch($vo['name']): case "功能资源": ?>
                     <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">模块:</label>
                        <div class="col-xs-12 col-sm-8">
                            <select class="form-control" name="model" >
                                <option value="0">请选择</option>
                                <?php if(is_array($models) || $models instanceof \think\Collection || $models instanceof \think\Paginator): $i = 0; $__LIST__ = $models;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$model): $mod = ($i % 2 );++$i;?>
                                <option value="<?php echo $model['id']; ?>" <?php if(((!empty($data)) AND $model['id'] == $data['model']) OR ((!empty($gongnen)) AND $model['id'] == $gongnen['model_id'])): ?>selected<?php endif; ?>><?php echo $model['name']; ?></option>
                                <?php endforeach; endif; else: echo "" ;endif; ?>
                            </select>
                        </div>
                    </div>
                     <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">功能:</label>
                        <div class="col-xs-12 col-sm-8">
                            <select class="form-control" name="gongnen">
                                <option value="0">请选择</option>
                                <?php if(is_array($gongnens) || $gongnens instanceof \think\Collection || $gongnens instanceof \think\Paginator): $i = 0; $__LIST__ = $gongnens;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$go): $mod = ($i % 2 );++$i;?>
                                <option value="<?php echo $go['id']; ?>" <?php if(((!empty($data)) AND $go['id'] == $data['gongnen']) OR ((!empty($gongnen)) AND $go['id'] == $gongnen['id'])): ?>selected<?php endif; ?>><?php echo $go['name']; ?></option>
                                <?php endforeach; endif; else: echo "" ;endif; ?>
                            </select>
                        </div>
                    </div>
                     <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">功能清单:</label>
                        <div class="col-xs-12 col-sm-8">
                            <select class="form-control" name="child_gongnen">
                                <option value="">请选择</option>
                                <?php if(is_array($child_gongens) || $child_gongens instanceof \think\Collection || $child_gongens instanceof \think\Paginator): $i = 0; $__LIST__ = $child_gongens;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$ch): $mod = ($i % 2 );++$i;?>
                                <option value="<?php echo $ch['id']; ?>" <?php if(((!empty($data)) AND $ch['id'] == $data['child_gongnen']) OR ((!empty($gongnen)) AND $ch['id'] == $gongnen['cid'])): ?>selected<?php endif; ?>><?php echo $ch['cname']; ?></option>
                                <?php endforeach; endif; else: echo "" ;endif; ?>
                            </select>
                        </div>
                    </div>
                   <?php break; case "模块资源": ?>
                       <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">模块:</label>
                        <div class="col-xs-12 col-sm-8">
                            <select class="form-control" name="model" >
                                <option value="0">请选择</option>
                                <?php if(is_array($models) || $models instanceof \think\Collection || $models instanceof \think\Paginator): $i = 0; $__LIST__ = $models;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$ch): $mod = ($i % 2 );++$i;?>
                                <option value="<?php echo $ch['id']; ?>" <?php if(((!empty($data)) AND $ch['id'] == $data['model']) OR ((!empty($model)) AND $ch['id'] == $model['id'])): ?>selected<?php endif; ?>><?php echo $ch['name']; ?></option>
                                <?php endforeach; endif; else: echo "" ;endif; ?>
                            </select>
                        </div>
                    </div>
                    <?php break; case "页面资源": ?>

                     <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">板块:</label>
                        <div class="col-xs-12 col-sm-8">
                            <select class="form-control" name="plate" id="plate">
                                <option value="0">请选择</option>
                                <?php if(is_array($plates) || $plates instanceof \think\Collection || $plates instanceof \think\Paginator): $i = 0; $__LIST__ = $plates;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$ch): $mod = ($i % 2 );++$i;?>
                                 <option value="<?php echo $ch['id']; ?>" <?php if(((!empty($data)) AND $ch['id'] == $data['plate'])  OR ((!empty($page)) AND $ch['id'] == $page['p_id'])): ?>selected<?php endif; ?>><?php echo $ch['name']; ?></option>
                                  <?php if(is_array($ch['son']) || $ch['son'] instanceof \think\Collection || $ch['son'] instanceof \think\Paginator): $i = 0; $__LIST__ = $ch['son'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$son): $mod = ($i % 2 );++$i;?>
                                    <option value="<?php echo $son['id']; ?>" <?php if(((!empty($data)) AND $son['id'] == $data['plate']) OR ((!empty($page)) AND $son['id'] == $page['p_id'])): ?>selected<?php endif; ?>>---<?php echo $son['name']; ?></option>
                                  <?php endforeach; endif; else: echo "" ;endif; endforeach; endif; else: echo "" ;endif; ?>
                            </select>
                        </div>
                    </div>

                     <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">页面:</label>
                        <div class="col-xs-12 col-sm-8">
                            <select class="form-control" name="page" id="page">
                                <option value="0">请选择</option>
                                <?php if(is_array($pages) || $pages instanceof \think\Collection || $pages instanceof \think\Paginator): $i = 0; $__LIST__ = $pages;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$ch): $mod = ($i % 2 );++$i;?>
                                 <option value="<?php echo $ch['id']; ?>" <?php if(((!empty($data)) AND $ch['id'] == $data['page']) OR ((!empty($page)) AND $ch['id'] == $page['id'])): ?>selected<?php endif; ?>><?php echo $ch['name']; ?></option>
                                <?php endforeach; endif; else: echo "" ;endif; ?>
                            </select>
                        </div>
                    </div>
                    <?php break; case "板块资源": ?>
                      <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">板块:</label>
                        <div class="col-xs-12 col-sm-8">
                            <select class="form-control" name="plate">
                                <option value="0">请选择</option>
                                <?php if(is_array($plates) || $plates instanceof \think\Collection || $plates instanceof \think\Paginator): $i = 0; $__LIST__ = $plates;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$ch): $mod = ($i % 2 );++$i;?>
                                <option value="<?php echo $ch['id']; ?>" <?php if((!empty($data)) AND $model['id'] == $data['plate']): ?>selected<?php endif; ?>><?php echo $ch['name']; ?></option>
                                <?php endforeach; endif; else: echo "" ;endif; ?>
                            </select>
                        </div>
                     </div>
                    <?php break; endswitch; ?>



                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">格式:</label>
                        <div class="col-xs-12 col-sm-8">
                            <label style="font-weight: normal;margin-right: 15px;cursor: pointer;"><input style="position: relative;top: 2px;" type="radio" name="type" value="1" <?php if(((!empty($data)) AND $data['type'] == 1) OR (empty($data))): ?>checked<?php endif; ?>>图片</label>
                            <label style="font-weight: normal;margin-right: 15px;cursor: pointer;"><input style="position: relative;top: 2px;" type="radio" name="type" value="2" <?php if((!empty($data)) AND $data['type'] == 2): ?>checked<?php endif; ?>>代码</label>
                            <label style="font-weight: normal;margin-right: 15px;cursor: pointer;"><input style="position: relative;top: 2px;" type="radio" name="type" value="3" <?php if((!empty($data)) AND $data['type'] == 3): ?>checked<?php endif; ?>>其他</label>
                        </div>
                    </div>
                    <div class="form-group ss attr attr_1">
                        <label class="control-label col-xs-12 col-sm-2">属性:</label>
                        <div class="col-xs-12 col-sm-8">
                            <?php if(is_array($attr['gnt']) || $attr['gnt'] instanceof \think\Collection || $attr['gnt'] instanceof \think\Paginator): $i = 0; $__LIST__ = $attr['gnt'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$ch): $mod = ($i % 2 );++$i;?>
                              <label style="font-weight: normal;margin-right: 15px;cursor: pointer;" class="gnt"><input style="position: relative;top: 3px;" type="radio" name="attr" <?php if((!empty($data)) AND $data['attr'] == $ch['id']): ?>checked<?php endif; ?>  value="<?php echo $ch['id']; ?>"><?php echo $ch['name']; ?></label>
                            <?php endforeach; endif; else: echo "" ;endif; ?>
                        </div>
                    </div>

                    <div class="form-group ss attr attr_2" style="display: none;">
                        <label class="control-label col-xs-12 col-sm-2">属性:</label>
                        <div class="col-xs-12 col-sm-8">
                            <?php if(is_array($attr['dm']) || $attr['dm'] instanceof \think\Collection || $attr['dm'] instanceof \think\Paginator): $i = 0; $__LIST__ = $attr['dm'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$ch): $mod = ($i % 2 );++$i;?>
                              <label style="font-weight: normal;margin-right: 15px;cursor: pointer;" class="dm"><input style="position: relative;top: 3px;" type="radio" name="attr" <?php if(((!empty($data)) AND $data['attr'] == $ch['id'])): ?>checked<?php endif; ?> value="<?php echo $ch['id']; ?>" data-name="<?php echo $ch['name']; ?>"><?php echo $ch['name']; ?></label>
                            <?php endforeach; endif; else: echo "" ;endif; ?>
                        </div>
                    </div>

                     <div class="form-group qita attr attr_3" style="display: none;">
                        <label class="control-label col-xs-12 col-sm-2">其他:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input type="text" name="attr" value="<?php echo (isset($data['attr']) && ($data['attr'] !== '')?$data['attr']:''); ?>" class="form-control"/>
                        </div>
                    </div>


                    <div class="form-group yuyan qd" style="display: none">
                        <label class="control-label col-xs-12 col-sm-2">语言:</label>
                        <div class="col-xs-12 col-sm-8">
                            <?php if(is_array($language['qd']) || $language['qd'] instanceof \think\Collection || $language['qd'] instanceof \think\Paginator): $i = 0; $__LIST__ = $language['qd'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$ch): $mod = ($i % 2 );++$i;?>
                             <label style="font-weight: normal;margin-right: 15px;cursor: pointer;" class="qd"><input style="position: relative;top: 2px;" name="language[]" value="<?php echo $ch['id']; ?>"  <?php if((!empty($data)) AND in_array($ch['id'],$data['language'])): ?>checked<?php endif; ?> type="checkbox"><?php echo $ch['name']; ?></label>
                            <?php endforeach; endif; else: echo "" ;endif; ?>
                        </div>
                    </div>

                     <div class="form-group yuyan hd" style="display: none">
                        <label class="control-label col-xs-12 col-sm-2">语言:</label>
                        <div class="col-xs-12 col-sm-8">
                            <?php if(is_array($language['hd']) || $language['hd'] instanceof \think\Collection || $language['hd'] instanceof \think\Paginator): $i = 0; $__LIST__ = $language['hd'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$ch): $mod = ($i % 2 );++$i;?>
                             <label style="font-weight: normal;margin-right: 15px;cursor: pointer;" class="hd"><input style="position: relative;top: 2px;" name="language[]" value="<?php echo $ch['id']; ?>" <?php if((!empty($data)) AND in_array($ch['id'],$data['language'])): ?>checked<?php endif; ?> type="checkbox"><?php echo $ch['name']; ?></label>
                            <?php endforeach; endif; else: echo "" ;endif; ?>
                        </div>
                    </div>

                     <div class="form-group yuyan qz" style="display: none">
                        <label class="control-label col-xs-12 col-sm-2">语言:</label>
                        <div class="col-xs-12 col-sm-8">
                            <?php if(is_array($language['qd']) || $language['qd'] instanceof \think\Collection || $language['qd'] instanceof \think\Paginator): $i = 0; $__LIST__ = $language['qd'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$ch): $mod = ($i % 2 );++$i;?>
                             <label style="font-weight: normal;margin-right: 15px;cursor: pointer;" class="qd"><input style="position: relative;top: 2px;" name="language[]" value="<?php echo $ch['id']; ?>"  <?php if((!empty($data)) AND in_array($ch['id'],$data['language'])): ?>checked<?php endif; ?> type="checkbox"><?php echo $ch['name']; ?></label>
                            <?php endforeach; endif; else: echo "" ;endif; if(is_array($language['hd']) || $language['hd'] instanceof \think\Collection || $language['hd'] instanceof \think\Paginator): $i = 0; $__LIST__ = $language['hd'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$ch): $mod = ($i % 2 );++$i;?>
                             <label style="font-weight: normal;margin-right: 15px;cursor: pointer;" class="hd"><input style="position: relative;top: 2px;" name="language[]" value="<?php echo $ch['id']; ?>" <?php if((!empty($data)) AND in_array($ch['id'],$data['language'])): ?>checked<?php endif; ?> type="checkbox"><?php echo $ch['name']; ?></label>
                            <?php endforeach; endif; else: echo "" ;endif; ?>

                        </div>
                    </div>


               <div id="contianer">
                 <?php if(!(empty($data['file']) || (($data['file'] instanceof \think\Collection || $data['file'] instanceof \think\Paginator ) && $data['file']->isEmpty()))): if(is_array($data['file']) || $data['file'] instanceof \think\Collection || $data['file'] instanceof \think\Paginator): $i = 0; $__LIST__ = $data['file'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$file): $mod = ($i % 2 );++$i;?>
                     <div class="form-group resouce">
                        <label class="control-label col-xs-12 col-sm-2">上传:</label>
                        <div class="col-xs-4 col-sm-3">
                            <input type="text" class="form-control" name="path[]" value="<?php echo $file['path']; ?>" placeholder="地址" />
                        </div>
                        <div class="col-xs-4 col-sm-3">
                            <input type="text" class="form-control" name="des[]" value="<?php echo $file['des']; ?>" placeholder="描述" />
                        </div>
                        <input type="hidden" class="form-control" name="fids[]"  value="<?php echo $file['id']; ?>"  value />
                        <div class="col-xs-4 col-sm-3" style="line-height: 27px;">
                            <span class="btn btn-xs btn-danger">删除</span>
                            <span class="btn btn-xs btn-success">查看</span>
                            <span class="btn btn-xs btn-success btn-add">添加</span>
                        </div>
                    </div>
                   <?php endforeach; endif; else: echo "" ;endif; endif; ?>

               </div>
                  

                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2"></label>
                        <div class="col-xs-12 col-sm-8" style="text-align: center;">
                            <input type="file" name="file" id="upload_good_img_<?php echo $vo['id']; ?>">
                            <script type="text/javascript">
                                //上传图片\
                                var id="<?php echo $vo['id']; ?>";
                                /* 初始化上传插件 */
                                $("#upload_good_img_"+id)
                                    .uploadify(
                                        {
                                            "height" : 30,
                                            "swf" : "/public/assets/js/uploadify/uploadify.swf",
                                            "fileObjName" : "download",
                                            "buttonText" : "上传图片",
                                            "uploader" : "<?php echo url('upload',array('session_id'=>session_id())); ?>",
                                            "width" : 100,
                                            'fileObjName':'file',
                                            'removeTimeout' : 1,
                                             'multi': true,
                                            "onUploadSuccess" : uploadPicture,
                                            'onFallback' : function() {
                                                alert('未检测到兼容版本的Flash.');
                                            }
                                        });
                                function uploadPicture(file, data) {
                                    var data = eval('('+data+')');
                                    var src = '';
                                    if (data.code) {
                                        src = data.url;
                                        $("input[name='path[]']").each(function(){
                                            if($(this).val()==''){
                                               $(this).val(src);
                                               return false;
                                             }
                                             
                                        })

                                        var str='<div class="form-group resouce">'+
                                                '<label class="control-label col-xs-12 col-sm-2"></label>'+
                                                '<div class="col-xs-4 col-sm-3">'+
                                                 '<input type="text" class="form-control" name="path[]" value="'+src+'" placeholder="地址" />'+
                                                '</div>'+
                                                '<div class="col-xs-4 col-sm-3">'+
                                                 '<input type="text" class="form-control" name="des[]" placeholder="描述" />'+
                                                '</div>'+
                                                '<input type="hidden" class="form-control" name="fids[]" value />'+
                                                '<div class="col-xs-4 col-sm-3" style="line-height: 27px;">'+
                                                '<span class="btn btn-xs btn-danger">删除</span>'+
                                                '<span class="btn btn-xs btn-success">查看</span>'+
                                                '</div>'+
                                                '</div>';
                                      
                                                 $("#contianer").append(str);
                                 

                                    } else {
                                        alert(data.info);
                                    }
                                }
                            </script>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2"></label>
                        <div class="col-xs-12 col-sm-8">
                            <input type="hidden" name="id" value="<?php echo (isset($data['id']) && ($data['id'] !== '')?$data['id']:''); ?>" />
                            <button type="submit" class="btn btn-success submit"><?php echo __('OK'); ?></button>
                        </div>
                    </div>
                </form>
            </div>
            <?php endforeach; endif; else: echo "" ;endif; ?>

        </div>
    </div>
</div>
<script>
    $(function() {

        $("body").on("click", ".btn-danger", function () {
            $(this).parents('.resouce').remove();
        });


        $("body").on("click", ".btn-add", function () {
            var div_clone = $(this).parents('.resouce').clone(true);
            $(this).parents('.resouce').after(div_clone);
        });

        //板块切换时
        $("body").on("click", "#plate", function () {
            var plate_id = $(this).val();
            $.ajax({
                type: 'GET',
                data: {plate_id: plate_id},
                url: "<?php echo url('ajaxGetPage'); ?>",
                success: function (data) {
                    $("#page").html('')
                    $("#page").append(data.msg);
                }
            });

        })

        $("input[name=type]").click(function(){
            var checked=$(this).val();

            if(checked==1){
              $(".yuyan").hide();
            }
            $(".attr").hide();
            $(".attr_"+checked).show();
            if(checked==2){
                $(".qd").show();
            }

        });

        $(".attr_2").find(":radio").click(function(){
           var name=$(this).attr('data-name');
            $(".yuyan").hide();
           switch(name){
             case "前端代码":
              $(".qd").show();
             break;
             case "后端代码":
              $(".hd").show();
             break;
             case "全栈代码":
              $(".qz").show();
             break;
           }
        })

        $(".submit").click(function(){   
            var data_str=$(".active form").serialize();
            var data_arr=data_str.split("&").filter(function (x) {
                return x!== "attr=";
            });

             var post_data=data_arr.join("&")   
             $.ajax({
                type:'POST',
                data:post_data,
                url:"<?php echo url('zsave'); ?>",
                traditional: true,
                success:function(data){
                    if(data.code==1){
                        alert(data.msg);
                        window.location.href=data.url;
                    }else{
                        alert(data.msg);
                    }
                }
            });

            return false;  
        })

    });

</script>


                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
<script src="/public/assets/js/require<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js" data-main="/public/assets/js/require-backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo $site['version']; ?>"></script>
    </body>
</html>